package com.hellohoper.assembly.common.utils.base.model;


import lombok.Getter;
import lombok.Setter;

/**
 * Created by hk on 12/10/16.
 */
@Getter
@Setter
public class PageModel<T> extends BaseModel {

    private int pageNo, pageSize;

    private long total;

    private T rows;

    public PageModel() {
    }

    public PageModel(int pageNo, int pageSize, long total, T rows) {
        this.pageNo = pageNo;
        this.pageSize = pageSize;
        this.total = total;
        this.rows = rows;
        super.setErrorCode("0");
    }

    public PageModel(String errorMsg, String errorCode) {
        super.setErrorMsg(errorMsg);
        super.setErrorCode(errorCode);
    }


}
